<template>
  <section class="target" id="cesiumDom"></section>
</template>
<script lang="jsx" setup>
import { ref, onMounted } from 'vue';
import SuperMap from './SuperMap';

const initMapCallback = () => {
  try {
    console.error('cesiumMap initMapCallback');
  } catch (error) {
    console.warn(error);
  }
};
const onClickArea = (area) => {
  try {
    console.error('area', area);
  } catch (error) {
    console.warn(error);
  }
};
const onClickPoint = (point) => {
  try {
    console.error('point', point);
  } catch (error) {
    console.warn(error);
  }
};
const mapRef = ref();
onMounted(() => {
  mapRef.value = new SuperMap({
    dom: 'cesiumDom',
    initMapCallback,
    onClickArea,
    onClickPoint,
  });
});
</script>
<style lang="less" scoped>
.target {
  width: 100vw;
  height: 100vh;
}
</style>
